package com.shuizhu.template.demo5;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.converters.string.StringImageConverter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.net.URL;
 
@Data
@EqualsAndHashCode
@HeadRowHeight(30)
@ContentRowHeight(80)
@ColumnWidth(15)
@HeadStyle(fillForegroundColor = 44)
@NoArgsConstructor
@AllArgsConstructor
public class Customer {
 
    @ExcelProperty({"客户编号"})
    private String userCode;
 
    @ExcelProperty({"客户名称"})
    private String userName;
 
    @ColumnWidth(25)
    @ExcelProperty({"客户所在地址"})
    private String address;
 
    @ExcelProperty({"联系人信息", "联系人姓名"})
    private String personName;
 
    @ExcelProperty({"联系人信息", "联系电话"})
    private String telephone;
 
    @ExcelProperty({"图片"})
    private URL picture;
 
    /**
     * 你也可以通过字符串的形式来保存图片，具体说明见注意事项3.1
     */
    //@ExcelProperty(converter = StringImageConverter.class, value = {"本地图片"})
    //private String localPic;
}